home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / security / Watcher / xmalloc.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-07-13  |  318 b   |  26 lines

  1. /*
  2.    xmalloc is just a call to malloc with error checking.
  3.  
  4.    Kenneth Ingham
  5.  
  6.    Copyright (C) 1989 The University of New Mexico
  7. */
  8.  
  9. #include "defs.h"
  10.  
  11. char *
  12. xmalloc(size)
  13. unsigned size;
  14. {
  15.     char *cp, *malloc();
  16.  
  17.     cp = malloc(size);
  18.  
  19.     if (cp == NULL) {
  20.         fprintf(stderr,"malloc died.");
  21.         exit(1);
  22.     }
  23.  
  24.     return cp;
  25. }
  26.